﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OnlineMealOrdering.Common
{
    public class EPSystemException:Exception
    {
        public EPSystemException(string message):base(message)
        { 
        }

        public EPSystemException(string messageFormat, params object[] args)
            : base(string.Format(messageFormat, args))
        { 
        }

        #region public methods
        
        public string GetExceptionMessage()
        {
            return Message;
        }

        #endregion

        #region static methods

        public static EPSystemException Create(string message)
        {
            return new EPSystemException(message);
        }

        public static EPSystemException Create(string messageFormat, params object[] args)
        {
            return new EPSystemException(messageFormat, args);
        }

        #endregion
    }
}
